Creating Modules
When creating documentation for your code, you typically want to document your APIs and code in a way that eases the cognitive load of those who may need to review your code.
Docular provides Modules
as the first level of abstraction to help people understand how your code is organized.
Typically, you would want a module to be completely self sufficient. It should have no dependencies on other modules or other code. In AngularJS terms this makes complete sense, but for projects that use frameworks that do not provide this natural "modularity", you may need to put a little thought into this.
You NEVER have to say "Yo, make me a module". All you need to do is create a document that has an id
that specifies a module. For example, suppose I create a document within my code that looks like this:
/** * @ngdoc service * @name booyah.service:yayer * @description Awesome Sauce */
First off, since I didn't specify an "@id", Docular copies the "@name" attribute ot the "id" field.
Now we know the "id" is also "booyah.service:yayer". Now, if you recall the naming conventions Docular uses, you can see that booyah
is the module specified for this id. That's all you need to do! Docular sees that you need to generate that module if it already hasn't generated it and you are all set! Easy peezy lemon sqeezy.
@name
attribute. It will also become the id
For more examples of module generation, check out this documentation steeze.